<?php /* Smarty version 2.6.16, created on 2013-08-21 15:30:05
         compiled from ../templates/admin/adminusers/permissions.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'base64_encode', '../templates/admin/adminusers/permissions.tpl', 45, false),array('modifier', 'ucfirst', '../templates/admin/adminusers/permissions.tpl', 45, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  echo '<script type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/admin/settings.js" /></script>'; ?>

<?php echo '
<script language="javascript">
function showPermission(val){
	if(val != \'\') {
		window.location.href = SITEROOT+\'/admin/home.php?q=permissions&id=\'+val;
	} else {
		alert(\'Select admin user\');
		return false;
	}
}
</script>
'; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="contain">
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['left_menu'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      <div class="right_contain">
         <div class="heading_box">Set Permissions</div>
         <div class="whitebox">
         
         <!--Message Div Start-->
         <?php if ($this->_tpl_vars['msg']): ?>
         <div class="masg_div">
         	<?php echo $this->_tpl_vars['msg']; ?>

         </div>
         <?php endif; ?>
         <!--Message Div End-->
         
         <div>
          <!--Form Contain start-->
           
           <div class="table_viewbox">
           <br />
              <form name="searchFrm" id="searchFrm" method="post" action="">
            	<table width="100%" border="0" cellpadding="3" cellspacing="5">
                	<tr>
                    	<td align="left" width="50%">Using this settings admin can set modules permissions to admin users.</td>
                        <td align="right" width="50%">
                        <select class="input41_selet" name="userid" onchange="javascript: showPermission(this.value);" style="width:50%">
                        <option value="">Select Admin User</option>
                        <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['userArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                        <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['userArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
" <?php if (((is_array($_tmp=$this->_tpl_vars['userArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)) == $_GET['id']): ?> selected="selected" <?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['userArray'][$this->_sections['i']['index']]['first_name'])) ? $this->_run_mod_handler('ucfirst', true, $_tmp) : smarty_modifier_ucfirst($_tmp)); ?>
&nbsp;<?php echo ((is_array($_tmp=$this->_tpl_vars['userArray'][$this->_sections['i']['index']]['last_name'])) ? $this->_run_mod_handler('ucfirst', true, $_tmp) : smarty_modifier_ucfirst($_tmp)); ?>
</option>
                        <?php endfor; endif; ?>
                        </select>
                        </td>
                    </tr>
                </table>
            </form>
             <br />
            <form name="frm" id="frm" action="" method="post" >
            <input type="hidden" name="hidden_userid" id="hidden_userid" value="<?php echo $_GET['id']; ?>
" />

            <input type="hidden" name="checkedvalue" id="checkedvalue" value="<?php echo $this->_tpl_vars['checkedvalue']; ?>
" />
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th width="6%" align="center">#</th>
                <th width="6%"><input type="checkbox" name="check" id="check" <?php if ($this->_tpl_vars['uncheckedvalue'] == '1'): ?> checked="checked" <?php endif; ?>  /></th>
                <th width="88%">Module</th>
                
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['modules']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
              <tr class="<?php if ($this->_tpl_vars['modules'][$this->_sections['i']['index']]['perm_status'] == '1'): ?>activerow<?php else: ?>inactiverow<?php endif; ?>" id="tr_<?php echo $this->_tpl_vars['modules'][$this->_sections['i']['index']]['module_id']; ?>
">
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
                <td><input type="checkbox" name="checkall[]" id="checkall_<?php echo $this->_sections['i']['iteration']; ?>
" value="<?php echo $this->_tpl_vars['modules'][$this->_sections['i']['index']]['module_id']; ?>
" <?php if ($this->_tpl_vars['modules'][$this->_sections['i']['index']]['perm_status'] == '1'): ?> checked="checked" <?php endif; ?> /></td>
                <td><?php echo $this->_tpl_vars['modules'][$this->_sections['i']['index']]['module_name']; ?>
</td>
                
              </tr>
              <?php endfor; endif; ?>
               <tr>
                <td colspan="4">
                
                <div class="select_box">
	               <input type="submit" class="admin_btn" value="Update" name="update" id="update" />
                   
                   <input type="button" class="admin_btn" value="Back" name="Back" id="Back" onclick="javascript: history.go(-1);" />
                   <div id="errormsg" class="error"></div> 
                </div>
                </td>
              </tr>
            </table>
</form>
            

         </div>
            <!--Form Contain end--> 
          
         </div>
         
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>